﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ERPStore.Web.ModelMetadata
{
	public class ModelMetaData
	{
		public Type ModelType { get; set; }
		public string PropertyName { get; set; }
		public Required Required { get; set; }
		public bool IsRequired(object instance)
		{
			if (Required == null)
			{
				return false;
			}
			return Required.WithCondtionFor(instance);
		}
		public string DisplayName { get; set; }
		public string Description { get; set; }
		public bool IsReadOnly { get; set; }
		public string Watermark { get; set; }
		public int MaxStringLength { get; set; }
		public int MinStringLength { get; set; }
		public string DisplayFormatString { get; set; }
	}
}
